Skip to content

fix(id): make the nixos-integration partition guard check disjointness (#1372) - #12578

Merged
dezren39 merged 1 commit into
mainfrom
felix/1372-nixos-integration
Nov 22, 2026
Merged

dezren39 merged 1 commit into
mainfrom
felix/1372-nixos-integration

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Problem

#1372's legibility harness (PR #4913) guards the named-group split of the nixos-integration VM suite with a partition check whose assertion reads group filters must partition the suite exactly; duplicated=... uncovered=.... The duplicated half never fires: the overlap term counted matches within each group's own hit list

overlap = sorted({t for _name, hits in covered for t in hits if hits.count(t) > 1})

and --list names are unique, so a per-group count can never exceed one. A test matched by two groups — e.g. a serve_tests:: test whose name also hits one of the harness_unit bare-name filters (test_output_within_...) — would run twice, silently inflating the suite and its budget, while the guard reports an exact partition. The header comment ("Group filters are verified to partition every test in the binary") overclaims what the code checks.

The same change removes an unreachable print left after the final failed-groups raise (dead since cc96cc4).

Decision record (summary)

Recorded on #1372 per FDR-0013 / decide-and-proceed: no owner decision is outstanding on #1372. The waits in its history were on other issues (#4850, #4960, #774, #8354 — all closed) and on a nightly that structurally could not complete (90-minute job timeout vs 3600s + 1200s suite budgets), fixed by PR #12526. The remaining close condition — one completed full nix flake check verdict on nixos-integration — is a measurement the fleet produces itself; run 45026136879 is in flight. status/blocked removed.

Change

pkgs/id/nix/tests/integration-test.nix only (+10/−7): count filter matches across all groups (match_counts), derive overlap from counts > 1 and missing from the same map; delete the dead print. No group, filter, deadline, or budget changes; the real suite's partition verdict is unchanged.

Evidence

Bounded exercise of the exact emitted testScript (extracted from the .nix, ${...} stubbed, execed under python3 against a fake driver --list; no VM build), three fixtures:

fixture before after
disjoint (real-shaped) guard passed guard passed
overlap (serve_tests::test_output_within_kills_a_hung_process) guard passed (bug) guard rejected: duplicated=['serve_tests::test_output_within_kills_a_hung_process']
uncovered (world_tests::...) rejected, uncovered=[...] rejected, uncovered=[...] (unchanged)

Plus: py_compile of the emitted testScript OK, and nix eval ./pkgs/id#checks.x86_64-linux.nixos-integration.name on the laptop at eb64ac8 → "vm-test-run-id-integration" (the sandbox cannot eval: /nix/store ownership). A full VM run of the check is not claimed here; it rides the nightly.

Merge danger

Low. One nix file, test-harness python only; the guard runs inside the VM before any test executes, and a false rejection would fail the check loudly with the partition assertion rather than silently changing coverage. Revert is a single-commit undo.

What remains on #1372

The recorded close condition: run 45026136879's verdict on nixos-integration (pass, or fail fast naming a group). This PR does not close the issue.


Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#1372)

The coverage guard added by #4913 claims to prove the group filters
partition the suite exactly, but its overlap term counted matches
within each group's own hit list. --list names are unique, so that
count can never exceed one and duplicated= was always empty: a test
matched by two groups (e.g. a serve_tests test whose name also hits a
harness_unit bare-name filter) would run twice, silently, and the
guard would still pass. Count matches across groups instead.

Also remove the unreachable print left after the final failed-groups
raise (dead since cc96cc4).

Evidence (bounded exercise of the exact emitted testScript, python3,
no VM build): before, an overlapping fixture passed the guard; after,
it is rejected naming the duplicated test. Disjoint and uncovered
fixtures behave identically before and after, and the emitted
testScript compiles.
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 14:19
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe1359ab-ee62-49f1-aea2-4ec5a49e97d2
Commits

Reviewing files that changed from the base of the PR and between d8fe781 and eb64ac8.

Files selected for processing: 1

  • pkgs/id/nix/tests/integration-test.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T14:20:43.310108Z eb64ac8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 8f96db6 into main Nov 22, 2026
2 checks passed
@dezren39
dezren39 deleted the felix/1372-nixos-integration branch November 22, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant